home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / sgml / msdos / sgml07 / sgmlaux.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-10  |  2.3 KB  |  70 lines

  1. /* This file controls the interface between the parser core and the auxiliary
  2. functions in entgen.c, sgmlio.c, and sgmlmsg.c */
  3.  
  4. #include "std.h"
  5. #include "entity.h"
  6. #include "sgmldecl.h"
  7.  
  8. /* Error types (ERRTYPE) for calls to error-handling services
  9.    performed for SGML by the text processor (SGMLIO).
  10.    NOTE: Strings in these blocks have no lengths, but cannot exceed
  11.    NAMELEN (plus 1 more byte for the zero terminator).
  12. */
  13. #define FILERR    0           /* Error: file access. */
  14. #define DOCERR    1           /* Error: in document markup. */
  15. #define MDERR     2           /* Error: in markup declaration with subdcl. */
  16. #define MDERR2    3           /* Error: in markup declaration with no subdcl. */
  17. #define EXITERR   4           /* Error: terminal error in document markup. */
  18. /* Quantities affecting error messages and their arguments.
  19. */
  20. #define MAXARGS    2          /* Maximum number of arguments in a msg. */
  21.  
  22. /* NOTE: Error handler must return, or next call to SGML must be RSET or END,
  23.          except for EXITERR errors which must not return.
  24. */
  25. struct error {                /* IPB for error messages. */
  26.      UNS errtype;             /* Type of error: DOC, MD, MD2, FIL. */
  27.      UNS errnum;              /* Error number. */
  28.      UNS errsp;               /* Special parameter index in message file. */
  29.      int sverrno;          /* Saved value of errno. */
  30.      int parmno;              /* MDERROR: declaration parameter number. */
  31.      UNCH *subdcl;          /* MDERROR: subject of declaration. */
  32.      UNIV eparm[MAXARGS];     /* Ptrs to arguments (no length, but EOS). */
  33. };
  34.  
  35. struct location {
  36.      int filesw;
  37.      unsigned long rcnt;
  38.      int ccnt;
  39.      UNCH curchar;
  40.      UNCH *ename;
  41.      UNIV fcb;
  42. };
  43.  
  44. int ioopen P((UNIV, UNIV*));
  45. VOID ioclose P((UNIV));
  46. int ioread P((UNIV, UNCH *, int *));
  47. VOID iopend P((UNIV, int));
  48. int iocont P((UNIV));
  49. VOID ioinit P((struct switches *));
  50. char *ioflid P((UNIV));
  51.  
  52. UNIV entgen P((struct fpi *));
  53.  
  54. VOID msgprint P((struct error *));
  55. VOID msginit P((struct switches *));
  56. UNIV msgsave P((struct error *));
  57. VOID msgsprint P((UNIV));
  58. VOID msgsfree P((UNIV));
  59. int msgcnterr P((void));
  60.  
  61.  
  62. int inprolog P((void));
  63. UNCH *getgi P((int));
  64.  
  65. int getlocation P((int, struct location *));
  66. UNIV rmalloc P((unsigned int));
  67. UNIV rrealloc P((UNIV, UNS));
  68. VOID frem P((UNIV));
  69. VOID exiterr P((unsigned int,struct parse *));
  70.